how to resolve required a bean type